package com.dream.technology.db.entity;

import java.util.Map;

public class RcThirdPartyCommunicationWithBLOBs extends RcThirdPartyCommunication {
    private String exception;

    private String requestBody;

    private String requestHeaders;

    private String responseBody;

    private String responseHeaders;

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception == null ? null : exception.trim();
    }

    public String getRequestBody() {
        return requestBody;
    }

    public void setRequestBody(String requestBody) {
        this.requestBody = requestBody == null ? null : requestBody.trim();
    }

    public String getRequestHeaders() {
        return requestHeaders;
    }

    public void setRequestHeaders(String requestHeaders) {
        this.requestHeaders = requestHeaders == null ? null : requestHeaders.trim();
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody == null ? null : responseBody.trim();
    }

    public String getResponseHeaders() {
        return responseHeaders;
    }

    public void setResponseHeaders(String responseHeaders) {
        this.responseHeaders = responseHeaders == null ? null : responseHeaders.trim();
    }


    public void setResMap(Map<String,String> data){
        this.setException(data.get("exception"));
        this.setRequestBody(data.get("requestBody"));
        this.setRequestHeaders(data.get("requestHeaders"));
        this.setRequestMethod(data.get("requestMethod"));
        this.setRequestTime(data.get("requestTime"));
        this.setRequestUrl(data.get("requestUrl"));
        this.setResponseBody(data.get("body"));
        this.setResponseTime(data.get("responseTime"));
        this.setResponseStatus(data.get("code"));



    }
}
